package com.ykht.proj.coupon.Enum;

public enum UserTypeEnum {
	// 0系统管理员1公司2品牌3门店'
	admin(0,"系统管理员"),
	company(1,"公司"),
	brand(2,"品牌"),
	shop(3,"门店"),
	WAITER(4,"服务员"),
	customer_company(5,"企业客户");

	private Integer value;
	private String desc;

	private UserTypeEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		UserTypeEnum[] values = UserTypeEnum.values();
		for (UserTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}
	public static UserTypeEnum getThisByVal(Integer val) {
		UserTypeEnum[] values = UserTypeEnum.values();
		for (UserTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe;
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
